package com.hzw.saas.service.rss.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@Accessors(chain = true)
@Document(indexName = "rss", replicas = 0)
public class JournalArticleNotice implements Serializable {

    @Id
    private String pid;

    @Field(type = FieldType.Keyword)
    private String rssId;

    @Field(type = FieldType.Keyword)
    private String catalogId;

    @Field(type = FieldType.Keyword)
    private String journalIssn;

    @Field(type = FieldType.Text, analyzer = "standard")
    private String journalName;

    @Field(type = FieldType.Text, analyzer = "standard")
    private String title;

    @Field(type = FieldType.Text, analyzer = "standard")
    private String description;

    @Field(type = FieldType.Keyword)
    private List<String> authors;

    @Field(type = FieldType.Keyword)
    private String identifier;

    @Field(type = FieldType.Keyword)
    private String linkUrl;

    @Field(type = FieldType.Date, store = false, format = DateFormat.date_time)
    private Date pubDate;
}
